<ion-header class="nav-header">
  <ion-toolbar>
    <ion-buttons slot="start">
      <ion-button (click)="closeModal()">
        <ion-icon class="toolbar-white" ios="ios-close"></ion-icon>
      </ion-button>
    </ion-buttons>
    <ion-title>投注</ion-title>
    <ion-buttons slot="end" (click)="onEdit()">
      <ion-button class="toolbar-white" *ngIf="!isEdit">编辑</ion-button>
      <ion-button class="toolbar-white" *ngIf="isEdit">完成</ion-button>
    </ion-buttons>
  </ion-toolbar>
</ion-header>
<ion-content class="bet-c">

  <ion-grid class="content-grid">
    <ion-row *ngFor="let item of showData; let i=index;">
      <ion-col size="5" *ngIf="!(item.pname | empty)">{{item.pname}}-{{item.name}}</ion-col>
      <ion-col size="5" *ngIf="item.pname | empty">{{item.name}}</ion-col>
      <ion-col size="3">
        <ion-label color="primary"> {{item.rate}} </ion-label>
      </ion-col>
      <ion-col size="3">
        <ion-input type="number" id="cach_{{i}}" (ionFocus)="onSigleCashFocus(i)" (ionInput)="onSigleCashChange(i)"
          value="{{item.cash}}"></ion-input>
      </ion-col>
      <ion-col size="1" (click)="onDeleteLot(i)" *ngIf="isEdit">
        <ion-icon ios="ios-close"></ion-icon>
      </ion-col>
    </ion-row>
    <!-- <ion-row>
      <ion-col size="5">我是谁</ion-col>
      <ion-col size="3"><ion-label color="primary"> 1.99 </ion-label></ion-col>
      <ion-col size="3"><ion-input type="number" value="333"></ion-input></ion-col>
      <ion-col size="1" *ngIf="isEdit"><ion-icon ios="ios-close"></ion-icon></ion-col>
    </ion-row> -->
  </ion-grid>
</ion-content>
<ion-footer>
  <ion-grid class="footer-grid">
    <ion-row class="f-g-r-one">
      <ion-col size="7">
        <ion-input type="number" placeholder="请输入投注额" clearInput="true" id="inputCach" value=""
          (ionInput)="onAllCachChange()"></ion-input>
      </ion-col>
      <ion-col size="2" (click)="onSetMoney('two')">
        <ion-icon class="iconfont  ion-ios-qianbao1" style="font-size: 30px; margin-bottom: 6px;"></ion-icon>
      </ion-col>
      <ion-col size="3">
        <ion-button color="primary01" (click)="onSetMoney('one')" size="small" style="width: 100%;" shape="round"> 预设
        </ion-button>
      </ion-col>
    </ion-row>
    <ion-row class="row-total">
      <ion-col size="6"> 总计&nbsp;&nbsp;<ion-label color="primary">{{betNum}}&nbsp;注</ion-label>
      </ion-col>
      <ion-col size="6"> 合计&nbsp;&nbsp;<ion-label color="primary">{{betTotalMoney}}&nbsp;元</ion-label>
      </ion-col>
    </ion-row>
    <ion-row style="height: 60px; padding: 0px 10px;">
      <ion-col size="12">
        <ion-button (click)="onBet()" expand="block" style="width: 100%;" color="primary01" size="default"
          shape="round"> 下注 </ion-button>
      </ion-col>
    </ion-row>
  </ion-grid>
</ion-footer>
<div class="mark-contain" *ngIf="showFastWin">
  <!-- 快速选择金额 -->
  <div class="m-contain-select" *ngIf="!showNumWin">
    <div class="select-win-res"
      [ngClass]="{'select-win-res-one':selectNum==1,'select-win-res-two':selectNum==2,'select-win-res-three':selectNum==3,'select-win-res-four':selectNum==4,'select-win-res-five':selectNum==5}">
      <span (click)="onSelectpresetVal(0,presetArr[0])"
        *ngIf="!(presetArr[0] | empty)"><em>{{presetArr[0]}}</em><b></b></span>
      <span (click)="onSelectpresetVal(1,presetArr[1])"
        *ngIf="!(presetArr[1] | empty)"><em>{{presetArr[1]}}</em><b></b></span>
      <span (click)="onSelectpresetVal(2,presetArr[2])"
        *ngIf="!(presetArr[2] | empty)"><em>{{presetArr[2]}}</em><b></b></span>
      <span (click)="onSelectpresetVal(3,presetArr[3])"
        *ngIf="!(presetArr[3] | empty)"><em>{{presetArr[3]}}</em><b></b></span>
      <span (click)="onSelectpresetVal(4,presetArr[4])"
        *ngIf="!(presetArr[4] | empty)"><em>{{presetArr[4]}}</em><b></b></span>
    </div>
    <div class="select-win-res-border"></div>
    <div class="btn-submit" (click)="onSubmitFast('two')">确定</div>
  </div>
  <!-- 填写金额 -->
  <div class="m-contain-div" *ngIf="showNumWin">
    <div *ngIf="!(presetArr | empty)">
      <div class="m-contain-div-input-d">
        <ion-input type="number" class="preset_input" placeholder="设置金额" id="preset_0" clearInput="true" value="{{presetArr[0]}}">
        </ion-input>
      </div>
      <div class="m-contain-div-input-d">
        <ion-input type="number" class="preset_input" placeholder="设置金额"  id="preset_1" clearInput="true" value="{{presetArr[1]}}">
        </ion-input>
      </div>
      <div class="m-contain-div-input-d">
        <ion-input type="number" class="preset_input" placeholder="设置金额" id="preset_2" clearInput="true" value="{{presetArr[2]}}">
        </ion-input>
      </div>
      <div class="m-contain-div-input-d">
        <ion-input type="number" class="preset_input" placeholder="设置金额" id="preset_3" clearInput="true" value="{{presetArr[3]}}">
        </ion-input>
      </div>
      <div class="m-contain-div-input-d">
        <ion-input type="number" class="preset_input" placeholder="设置金额" id="preset_4" clearInput="true" value="{{presetArr[4]}}">
        </ion-input>
      </div>
    </div>
    <div *ngIf="presetArr | empty">
      <div class="m-contain-div-input-d">
        <ion-input type="number" class="preset_input" placeholder="设置金额" id="preset_0" clearInput="true" value=""></ion-input>
      </div>
      <div class="m-contain-div-input-d">
        <ion-input type="number" class="preset_input" placeholder="设置金额" id="preset_1" clearInput="true" value=""></ion-input>
      </div>
      <div class="m-contain-div-input-d">
        <ion-input type="number" class="preset_input" placeholder="设置金额" id="preset_2" clearInput="true" value=""></ion-input>
      </div>
      <div class="m-contain-div-input-d">
        <ion-input type="number" class="preset_input"  placeholder="设置金额" id="preset_3" clearInput="true" value=""></ion-input>
      </div>
      <div class="m-contain-div-input-d">
        <ion-input type="number" class="preset_input" placeholder="设置金额" id="preset_4" clearInput="true" value=""></ion-input>
      </div>
    </div>
    <div class="btn-contain">
      <span (click)="onCloseFast(0)" [ngClass]="{'selectActive':isOpen==0}">关闭</span>
      <span (click)="onOpenFast(1)" [ngClass]="{'selectActive':isOpen==1}">开启</span>
    </div>
    <div class="btn-submit" (click)="onSubmitFast('one')">确定</div>
  </div>

</div>